package com.itheima.dao;

import com.github.pagehelper.Page;
import com.itheima.pojo.Address;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface AddressDao {
    @Select("select * from t_adress")
    Page<Address> findAll();

    @Select("select * from t_adress")
    List<Address> findAdressName();

    @Insert("insert into t_adress (name,lng,lat) values(#{name},#{lng},#{lat})")
    void add(Address address);

    Page<Address> selectByCondition(String queryString);

    @Delete("delete from t_adress where id = #{id}")
    void deleteById(Integer id);


}
